module.exports = app => {
    const mongoose = require('mongoose')
    
    // 连接数据库
    mongoose.connect('mongodb://localhost:27017/app-demo', {
        useNewUrlParser: true,
        useFindAndModify: true,
        useCreateIndex: true,
        useUnifiedTopology: true
    })
}